from pydantic import Field, BaseModel


# ######## user相关 ########
class UserQueryData(BaseModel):
    username: str = Field(..., title="用户名", description="用户名")
    name: str = Field(..., title="姓名", description="姓名")
    superuser: bool = Field(..., title="是否是超级管理员", description="是否是超级管理员")
    roles: list[int] = Field(..., title="角色id列表", description="角色id列表")


class UserCreateData(UserQueryData):
    pass


class UserUpdateData(UserQueryData):
    pass


# ######## role相关 ########
class RoleQueryData(BaseModel):
    name: str = Field(..., title="角色名称", description="角色名称")


class RoleCreateData(RoleQueryData):
    pass


class RoleUpdateData(RoleQueryData):
    pass
